This chapter describes the SNMP configuring and monitoring commands. It includes the following sections:
To access the SNMP configuration environment, enter the following command at the Config> prompt:
Config> protocol snmp SNMP user configuration SNMP Config>
This section describes the SNMP configuration commands.
Table 31 lists the SNMP configuration commands. The SNMP configuration commands allow you to specify parameters that define the relationship between the SNMP agent and the network management station. The information you specify takes effect immediately after a restart or reload of the IBM 2210.
Enter the SNMP configuration commands at the SNMP Config>
prompt.
Table 31. SNMP Configuration Commands Summary
Command | Function |
---|---|
? (Help) | Displays all the commands available for this command level or lists the options for specific commands (if available). See "Getting Help". |
Add | Adds a community to the list of SNMP communities, an IP address with mask to a community, or a subtree to a MIB view. |
Delete | Removes a community from the list of SNMP communities, an IP address with mask from a community, or a subtree from a MIB view. |
Disable | Disables SNMP protocol and traps associated with named communities. |
Enable | Enables SNMP protocol and traps associated with named communities. |
List | Displays the current communities with their associated access modes, enabled traps, IP addresses, and views. Also displays all views and their associated MIB subtrees. |
Set | Sets a community's access mode or view. A
community's access mode is one of the following:
This command is also used to set a trap UDP port and to set the password used to encrypt and authenticate security-sensitive data. |
Exit | Returns you to the previous command level. See "Exiting a Lower Level Environment". |
Table 32. SNMP Configuration Commands Options Summary
COMMAND | PARAM 1 | PARAM 2 | PARAM 3 | PARAM 4 | DEFAULT |
---|---|---|---|---|---|
add | community | <comm_name> | None | ||
address | <comm_name> | <ipAddress> | <ipMask> | ||
sub_tree | <view_text_name> | <oid> | |||
delete | community | <comm_name> | |||
address | <comm_name> | <ipAddress> | <ipMask> | ||
sub_tree | <view_text_name> | <oid> | |||
disable | snmp | ||||
trap | all | <comm_name> | |||
cold_start | <comm_name> | ||||
warm_start | <comm_name> | ||||
link_down | <comm_name> | ||||
link_up | <comm_name> | ||||
auth_fail | <comm_name> | ||||
enterprise | <comm_name> | ||||
enable | snmp | ||||
trap | all | <comm_name> | |||
cold_start | <comm_name> | ||||
warm_start | <comm_name> | ||||
link_down | <comm_name> | ||||
link_up | <comm_name> | ||||
auth_fail | <comm_name> | ||||
enterprise | <comm_name> | ||||
list | all | ||||
community | access | access | |||
traps | |||||
address | 255.255.255.255 | ||||
view | all | ||||
views | |||||
set | community | access | read_trap | <comm_name> | |
write_read_trap | <comm_name> | ||||
trap_only | <comm_name> | ||||
view | <community> | all | all | ||
<view_text_name> | |||||
trap_port | <udpPort#> | ||||
password | |||||
exit |
Use the add command to add a community name to the list of SNMP communities, add an address to a community, or assign a portion of the MIB (subtree) to a view.
Syntax:
Note: | To select access type or trap control, use the set community access command to assign access types to existing SNMP communities and use the enable trap or the disable trap command for trap control. |
Valid Values: A string of 1 to 31 alphanumeric characters. Characters such as spaces, tabs, or <ESC> key sequences are not supported.
Default Value: none
Example:
SNMP Config> add community Community Name []? comm01 Community added successfully
If you do not specify an address for a community, requests are handled from any host.
Addresses also specify hosts that receive the traps. If no address is specified, no trap is generated.
Valid Values: A string of 1 to 31 alphanumeric characters. Characters such as spaces, tabs, or <ESC> key sequences are not supported.
Default Value: none
Valid Values: Any valid IP address.
Default Value: 0.0.0.0
Valid Values: 0.0.0.0 - 255.255.255.255
Default Value: 255.255.255.255
Example:
SNMP Config> add address Community Name []? IP Address [0.0.0.0]? IP Mask [255.255.255.255]?
Valid Values: Any alphanumeric character string up to 31 characters in length. Characters such as spaces, tabs, or <Esc> key sequences are not accepted.
Default Value: none
Note: | You must assign a view to one or more communities using the set
community view command to have it take effect. The subtree
definitions are inclusive; that is, the subtree OID specified and any OID that
is lexicographically greater than the specified OID is considered part of the
MIB view.
If a community is added using the add community command, all supported MIB views are assigned to the community unless the set community view command is used to assign specific views to the community. |
This parameter contains a MIB subtree name included in the view defined with the View name parameter. All children of a specified MIB subtree are also included in the view.
For example, to provide a view that would give access to the system group in MIB-II, specify 1.3.6.1.2.1.1.
Valid Values:
An object identifier in the form of <element1>.<element2>.<element3>. . ., where:
Note: | This value must be numeric in dotted notation, not a symbolic value. |
Default Value: none
Example:
SNMP Config> add sub_tree View Name []? view01 MIB OID name []? 1.3.6.1.1 Subtree added successfully
Use the delete command to delete a community and all of its addresses, a specific address, or a subtree from a view.
Syntax:
Valid Values: A string of 1 to 31 alphanumeric characters. Characters such as spaces, tabs, or <ESC> key sequences are not supported.
Default Value: none
Example:
SNMP Config> delete community Community Name []?
Valid Values: A string of 1 to 31 alphanumeric characters. Characters such as spaces, tabs, or <ESC> key sequences are not supported.
Default Value: public
Valid Values: Any valid IP address.
Default Value: none
Example:
SNMP Config> delete address Community Name []? IP address []?
This parameter should be answered if you decide to restrict a community from accessing the entire MIB managed by the device's SNMP agent.
Default Value: none
This parameter contains a MIB subtree name included in the view defined with the View name parameter. All children of a specified MIB subtree are also included in the view.
Valid Values: An object identifier in the form of <element1>.<element2>.<element3>. . ., where:
Default Value:nne
Example:
SNMP Config> delete sub_tree View name[]? MIB OID[]?
Use the disable command to disable the SNMP protocol or specified traps on the device.
Syntax:
Example: disable snmp
Valid Values: A string of 1 to 31 alphanumeric characters. Characters such as spaces, tabs, or <ESC> key sequences are not supported.
Default Value: none
Example:
SNMP Config> disable trap link_up Community name []?
Trap Type | Description |
---|---|
all | Specifies all traps in a specified community. |
cold_start | A cold start trap means that the transmitting device is reinitializing and that the agent's configuration or the protocol entity implementation may be altered. |
warm_start | A warm start trap means that the transmitting device is reinitializing, but the configuration or protocol implementation will remain the same. Specify the community name as part of the command line. |
link_down | A link_down trap recognizes a failure in one of the communication links represented in the agent's configuration. The link_down trap-PDU contains the name and value of the ifIndex instance for the affected link as the first element of its variable-bindings. |
link_up | A link_up trap recognizes that a previously inactive link in the network has come up. The link_up trap-PDU contains the name and value of the ifIndex instance for the affected link as the first element of its variable-bindings. |
auth_fail | Authentication failure traps indicate that the sender of the SNMP request does not have the proper permission to talk to this box's SNMP agent. |
enterprise | Enterprise specific traps indicate that some enterprise specific event has occurred. The specific-trap field identifies the particular trap that occurred. For example, when configured to do so, ELS event messages are sent in enterprise-specific traps. |
Use the enable command to enable the SNMP protocol or specified traps on the device.
Syntax:
Example: enable snmp
Valid Values: A string of 1 to 31 alphanumeric characters. Characters such as spaces, tabs, or <ESC> key sequences are not supported.
Default Value: none
Use the list command to display the current configuration of SNMP communities, access modes, traps, network addresses, and views.
Syntax:
Example: list all
SNMP Config>list all SNMP is enabled Trap UDP port: 162 SRAM write is enabled Community Name Access -------------------------------- ------------------- oxnard Read, Write, Trap public Read, Trap Community Name IP Address IP Mask -------------------------------- --------------- --------------- oxnard 1.1.1.2 255.255.255.255 public All N/A Community Name Enabled Traps -------------------------------- -------------------------------- oxnard Link Down, Cold Restart public None Community Name View -------------------------------- -------------------------------- oxnard mib2 public All View Name Sub-Tree -------------------------------- -------------------------------- mib2 1.3.6.1.2 Password is set. (security data flow encrypted)
Option | Description |
---|---|
Access | Displays the access modes for the community. |
Address | Displays the network address for the community. |
Traps | Displays the types of traps generated for the community. |
View | Displays the MIB view for the community. |
Example:
SNMP Config list community access Community Name Access public Read, Write, Trap oxnard Read, Trap
Example:
SNMP Config> list community address Community Name IP Address IP Mask public All N/A oxnard 1.1.1.2 255.255.255.255
Example:
SNMP Config list community traps Community Name Enabled Traps public Link Down, Cold Restart oxnard NONE
Example:
SNMP Config> list community view Community Name View public All oxnard mib2
Example:
SNMP Config list views View Name Sub-Tree mib2 1.3.6.1.2.1
Use the set command to assign a MIB view to a community, to set the SNMP UDP trap port number, or set the access mode of the community or SNMP password.
Syntax:
The community name has:
Characters such as spaces, tabs, or <ESC> key sequences are not supported.
Example: set community access <options> comm_name
Valid Values: A string of 1 to 31 alphanumeric characters. Characters such as spaces, tabs, or <ESC> key sequences are not supported.
Default Value: none
Example: set community view comm_name <all or view_text_name>
Default Value: standard port
Example: set trap_port udpport#
Default Value: 162
Examples:
(a) setting the password to a string of zero length: SNMP Config>set pa Password: Remove password? (Yes, No): y Password is set to NULL. (security data are not accessible) (b) setting the password to "clear": SNMP Config>set pa Password: to verify Enter password again: Password is set to "clear". (WARNING: security data flow in clear) (c) setting the password to "test": SNMP Config>set pa Password: to verify Enter password again: Password is set. (security data flow encrypted)
To access the SNMP monitoring environment, enter the following command at the + (GWCON) prompt:
+ protocol snmp SNMP>
This section describes the SNMP monitoring commands.
Table 34 lists the SNMP monitoring commands. The SNMP monitoring commands allow you to view the parameters of the SNMP configuration and display some statistics relating to the SNMP agent.
Temporary changes to the runtime SNMP parameters can be made through the monitoring. They will immediately affect the operation of the SNMP agent. If you want to make the temporary changes permanent, then use the SAVE command. If the original SNMP configuration needs to be restored, use the resetcommand. This command allows you to temporarily alter the behavior of the SNMP agent, without permanently changing the configuration. For the temporary changes to take affect, you must EXIT the SNMP monitoring process.
Enter the SNMP monitoring commands at the SNMP>
prompt.
Table 34. SNMP Monitoring Command Summary
Command | Function |
---|---|
? (Help) | Displays all the commands available for this command level or lists the options for specific commands (if available). See "Getting Help". |
Add | Adds a community to the list of SNMP communities, an IP address with mask to a community, or a subtree to a MIB view. |
Delete | Removes a community from the list of SNMP communities, an IP address with mask from a community, or a subtree from a MIB view. |
Disable | Disables traps associated with named communities. Disabling SNMP or SRAM_write must be done using the SNMP Config> configuration environment. |
Enable | Enables traps associated with named communities. Enabling SNMP or SRAM_write must be done using the SNMP Config> configuration environment. |
List | Displays the current configuration of SNMP communities, views, access modes, traps, and network addresses. |
Reset | Updates the SNMP configuration with the values in the currently stored SNMP configuration. |
Save | Takes the specified changes and saves then permanently in the SNMP configuration. |
Set | Sets a community's access mode or view. A
community's access mode is one of the following:
* Read and trap generation * Read, write and trap generation * Trap generation only
Also allows setting of trap UDP port and password. See *** for additional information. |
Statistics | Displays statistics about the SNMP agent. |
Exit | Returns you to the previous command level. See "Exiting a Lower Level Environment". |
Use the add command to add a community name to the list of SNMP communities, add an address to a community, or assign a portion of the MIB (subtree) to a view.
For information on using the add command, see "Add".
Use the delete command to delete:
For information on using the delete command, see "Delete".
Use the disable command to disable specified traps on the device.
For information on using the disable command, see "Disable".
Use the enable command to enable specified traps on the device.
For information on using the enable command, see "Enable".
Use the list command to display the current configuration of SNMP communities, views, access modes, traps, and network addresses.
Syntax:
For information about using the list command, see "List".
Use the SNMP reset command to update the SNMP configuration with the values in the current stored SNMP configuration. This action allows changes to the current SNMP configuration when the device is restarted or reloaded.
Use the save command to permanently save the specified changes.
For information on using the set command, see "Set".
Use the statistics command to display statistics about the SNMP agent.
Syntax:
Example: statistics
Max Current Current Alloc Alloc In Use SNMP agent: 512000 181144 133120 SNMP MIBs: 1048576 57976 19712
The following information is displayed: